window.onload =async function() {
  const res =await get(
   '/dashboard/'
   )
 // console.log('res:',res);
  }

// 渲染用户名字
document.querySelector('#user').innerHTML = localStorage.getItem('username');
// 退出清数据
document.querySelector('#logout').addEventListener('click', function(){
  // 清除本地
  localStorage.removeItem('username');
  localStorage.removeItem('token');
  location.href = './login.html'
})

